package com.wujilee.shardingsphere.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wujilee.shardingsphere.entity.EntityOrder;
import com.wujilee.shardingsphere.entity.EntityUser;
import com.wujilee.shardingsphere.entity.vo.OrderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 预约记录表抄送关联表 Mapper 接口
 * </p>
 *
 * @author yishu
 * @since 2023-02-08
 */
@Mapper
public interface EntityOrderMapper extends BaseMapper<EntityOrder> {
    
    @Select("SELECT  tor .order_no ,sum(toi.price*toi.count) as amount  from t_order tor join t_order_item toi on  tor .order_no  = toi .order_no  GROUP  BY  tor .order_no ")
    List<OrderVo> getOrderVo();
}
